Skip to content

feat(ui-position): add available space to position#2552

Merged
joyenjoyer merged 1 commit into
masterfrom
ui-position-available-space
May 19, 2026
Merged

feat(ui-position): add available space to position#2552
joyenjoyer merged 1 commit into
masterfrom
ui-position-available-space

Conversation

@joyenjoyer

@joyenjoyer joyenjoyer commented May 12, 2026

Copy link
Copy Markdown
Contributor

Calculates and exposes popover's available room (gap between the trigger and the resolved constraint edge) as --ui-position-available-height / --ui-position-available-width CSS variables on the content node so consumers can cap their height/width with max-height: var(--ui-position-available-height). This is needed to make Popover and all other components that use Popover scrollable.

Test: go to the Popover docs page and observe the DOM of a Popover during scrolling, value of ui-position-available-height and --ui-position-available-width CSS vars should change.

@joyenjoyer joyenjoyer requested review from HerrTopi and git-nandor May 12, 2026 11:58
@joyenjoyer joyenjoyer self-assigned this May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-05-19 10:01 UTC

github-actions Bot pushed a commit that referenced this pull request May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Visual regression report

No changes.

Status Count
Unchanged 32
Changed 0
New 0
Removed 0

📊 View full report

Baselines come from the visual-baselines branch. They refresh on every merge to master.

@joyenjoyer joyenjoyer requested a review from ToMESSKa May 12, 2026 12:05
).not.toBe('')
})
expect(
content.style.getPropertyValue('--ui-position-available-width')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also go inside the waitFor to make the test more stable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is inside waitFor now.

@joyenjoyer joyenjoyer force-pushed the ui-position-available-space branch from 64edddb to 30f705f Compare May 14, 2026 13:54
@joyenjoyer joyenjoyer force-pushed the ui-position-available-space branch from 30f705f to 4760277 Compare May 14, 2026 13:56
@joyenjoyer joyenjoyer requested a review from git-nandor May 14, 2026 13:57
@joyenjoyer joyenjoyer merged commit 2ce7236 into master May 19, 2026
8 checks passed
@joyenjoyer joyenjoyer deleted the ui-position-available-space branch May 19, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants